package com.chenyue.cm.order.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 商品（金币）
 * </p>
 *
 * @author Lbx
 * @since 2021-11-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="JdProduct对象", description="商品（金币）")
public class JdProduct extends Model<JdProduct> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "类型")
    private Integer type;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date ct;

    @ApiModelProperty(value = "价格")
    private Double price;

    @ApiModelProperty(value = "在售价格")
    private Double salePrice;

    @ApiModelProperty(value = "ios平台价格id")
    private String iosPriceId;

    @ApiModelProperty(value = "是否推荐0不是1是")
    private Integer isRecommend;

    @ApiModelProperty(value = "商品描述")
    private String description;

    @ApiModelProperty(value = "1安卓2ios")
    private Integer deviceModel;

    @ApiModelProperty(value = "金币比率 1块钱能买几个币")
    private Integer exchangeRate;

    @ApiModelProperty(value = "时效性 0无限 1一个月 2一季度 3一年")
    private Integer timeType;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
